<template>
    <div class="home">
		<van-sticky>
			<div class="search">
				<van-search
				  v-model="value"
				  shape="round"
				  background='rgb(242,126,73)'
				  placeholder="农植解决方案"
				  @focus = "onfocus"
				/> 
				
			</div>
		</van-sticky>
		<van-tabs v-model="active" swipeable lazy-render sticky offset-top=58>
		  <van-tab v-for="index in datas" :title='index.title'>
				<list />
		  </van-tab>
		</van-tabs>
		
        <!-- <swiper :lunbotuList="lunbotuList" :isfull="true"></swiper> -->
      <!--  <van-grid :border="false" :column-num="3">
            <van-grid-item>
                <router-link to="/home/newslist">
                    <img src="../assets/menu1.png">
                    <div class="item-title">资讯头条</div>
                </router-link>
            </van-grid-item>
            <van-grid-item>
                <router-link to="/home/photolist">
                    <img src="../assets/menu2.png">
                    <div class="item-title">产品秀</div>
                </router-link>
            </van-grid-item>
            <van-grid-item>
                <router-link to="/home/goodslist">
                    <img src="../assets/menu3.png">
                    <div class="item-title">商品购买</div>
                </router-link>
            </van-grid-item>
            <van-grid-item>
                <router-link to="/home/goodslist">
                    <img src="../assets/menu4.png">
                    <div class="item-title">留言反馈</div>
                </router-link>
            </van-grid-item>
            <van-grid-item>
                <router-link to="/home/goodslist">
                    <img src="../assets/menu5.png">
                    <div class="item-title">视频专区</div>
                </router-link>
            </van-grid-item>
            <van-grid-item>
                <router-link to="/about">
                    <img src="../assets/menu6.png">
                    <div class="item-title">联系我们</div>
                </router-link>
            </van-grid-item>
        </van-grid> -->
    </div>
</template>

<script>
	
  
    import Vue from 'vue';
    import {Grid, GridItem,Icon, Toast, Tab, Tabs, Sticky} from 'vant';
	import list from '../components/list.vue'
    Vue.use(Grid).use(GridItem).use(Toast).use(Tab).use(Icon).use(Sticky).use(Tabs);


    export default {
        name: 'home',
        components: {list},
        data() {
            return {
				title:['假发','发箍','丝巾','其他'],
				datas:{
					'假发':{
						price:'1111',
						title:'假发'
					},
					'发箍':{
						price:'1111',
						title:'假发'
					},
					'丝巾':{
						price:'1111',
						title:'假发'
					},
					'其他':{
						price:'1111',
						title:'假发'
					},
				}
                
            }
        },
        created() {
            // this.getLunbo();
        },
        methods: {
			onfocus(){
				this.$router.push({
					path: '/search'
				})
			}
            /*getLunbo() {
                this.axios.get('api/getlunbo').then(response => {
                    if (response.data.status === 0) {
                        this.lunbotuList = response.data.message;
                    } else {
                        Toast("加载轮播图失败");
                    }
                })

            }*/ 

        }
    }
</script>
<style lang="scss" scoped>
    .home {
		.search{
			display: flex;
			flex-direction: row;
			justify-content: space-between;
			align-items: center;
			background:rgb(242,126,73);
			padding: 0 5px;
			.van-search{
				flex:1;
			}
		}
        .van-grid {
            background: #fff;

            .van-grid-item {
                img {
                    height: 60px;
                    width: 60px;
                }

                .item-title {
                    text-align: center;
                    font-size: 13px;
                    color: #242424;
                }

            }
        }
    }

</style>